package candidates;

import java.util.Comparator;


public class ComparatorCandidateNumberOfAnnotations implements Comparator<ArticleCandidate> {

	@Override
	public int compare(ArticleCandidate k1, ArticleCandidate k2) {
		int result = ((Integer)k1.getAnzahlAnnotationen()).compareTo((Integer)k2.getAnzahlAnnotationen());
		if (result != 0) return result;
		return k1.toString().compareTo(k2.toString());
	}

}
